﻿


MODULE parameters
    !----------------------------------
    ! Module to declare parameters and flag variables
    !----------------------------------
    IMPLICIT NONE
    SAVE

    integer,parameter:: case_type=1,numx=1,numz=18,numm=1,numc=50,nums=90,even=1,manual=1,scut=-1,numi=20
    integer,parameter::   nparam=9, nmom=14, poefirm=0, estimate=0, welfare_analysis=0,  n_proc=1, estimate_method=1, comparastat=0,ns=20,nvary=n_proc, &  
    complicated=1,statistics=0, setting=1,report_moments=1,illustration=0, decomposition=0, GE_fixed_Fs_innov=0

    real*8,parameter::smin=0d0,smax=1.0,gammae=0d0,gammae0=0d0,zeta=0.15,kappa=0.85,lambda=1d0-kappa-zeta,delta=0.069,r=0.04,beta=1d0/(1d0+r),kesi=1d0,&
        fv=1d0 ,grid_scale=1d0,vfi_update=0.7
    real*8,parameter::p_tremble = 1e-6,p_acq_tremble = 0.5,mu=0.5, str=4d0,smoothing_sd=0.0001,phi=0d0,phi2=0d0
    real*8,parameter::toler=1e-7,tolerv=1e-5,tolermu=1e-9,toler_dist =  1e-6

    integer,parameter::maxiter=50,maxitermu=500,max_iter_dist =50,maxiter30_value=5 

    real*8::k_helper, alpha,tau,xlow,gamma1,LAMBDA1,eta,xhigh,eps_p, chi ,stdea,rhoa ,psi , phi_c,alpha_mul, beta_mul 
    real*8:: muza,delta_s,outside_option,gammae2,pa,pt,diffmu,diff,diff_dist,diff_dist_inner,diffv,eps, g, gnew, Gz, GL, t1, t1a,t1b,t2,omega,omega2,theta,cmin,cmax,tttr,aaa,tttt,pi,zbar,info_asym,rhoa2,stdea2,mu_ub 
    integer :: ii_draw,nsim1,nt1,n,t,shock,is,ic,jjj,ttt,ii_e, jj_e,iter_dist, iter30,vary,np,i, iii,j, inn, inn_a, inn_t,jj,ig, counter,counter2,counter3,iprint_dec=50,ii,m,mm,k,ip,iip,maxiter2,iter1,maxiter30
    character (len=50) :: covfil2
    integer             :: errcode            

    
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    integer(kind=4), parameter :: IBD=4, RP=8
    integer(kind=IBD), parameter ::  Dim_XC=nparam ,randinitial=0
    integer(kind=IBD), parameter :: NPOP=n_proc, itermax=20000, strategy=6, &
        refresh=1, iwrite=7
    integer(kind=IBD), dimension(3), parameter :: methodde=(/0, 1, 0/)
    real(kind=RP), parameter :: VTR=-1.0e-4_RP, CR_XC=0.5_RP
    real(kind=RP) :: F_XC=0.8_RP, F_CR=0.8_RP
    !real(kind=RP), dimension(Dim_XC), parameter :: XCmin, XCmax
    real(kind=RP), dimension(Dim_XC) :: bestmem_XC
    integer(kind=IBD) :: nfeval
    real(kind=RP) :: bestval !,t1,t2
    integer(kind=IBD) :: mmm
    integer (kind=IBD), dimension(8) :: time
    integer :: proc_id, master=0, ierror, num_proc
    integer time1(8)
    real(8) diter0,diter1
    integer, parameter  :: sout=11,mout=22,lout=33

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


END MODULE parameters

!module u_data
!type, public :: my_data
!      integer a
!end type my_data
!end module
